import 'package:flutter/material.dart';
import 'package:ytbusiness/utils/helper.dart';
import 'package:ytbusiness/utils/screen_adaptation.dart';
import 'package:ytbusiness/widgets/widgets.dart';




//账户管理
class RepairAccountManagement extends StatefulWidget {
  @override
  _RepairAccountManagementState createState() => _RepairAccountManagementState();
}

class _RepairAccountManagementState extends State<RepairAccountManagement> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: customAppBar(context,title: "账户管理"),
      body: Container(
        color: Color(0xfff0f0f0),
        child: ListView(
          children: [
            // 账户余额
            Container(
              margin: EdgeInsets.only(top: setWidth(12)),
              padding: EdgeInsets.symmetric(horizontal: setWidth(15)),
              height: setWidth(100),
              color: Colors.white,
              child: Row(
                children: [
                  Expanded(
                    child: Container(
                      child: Column(
                        mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          Text(
                            '账户余额',
                            style: TextStyle(
                              color: Color(0xff010015),
                              fontSize: setSp(15),
                            ),
                          ),
                          Row(
                            crossAxisAlignment: CrossAxisAlignment.end,
                            children: [
                              Column(
                                children: [
                                  Text(
                                    '￥',
                                    style: TextStyle(
                                      color: Color(0xff010015),
                                      fontSize: setSp(12),
                                    ),
                                  ),
                                  Container(
                                    height: setWidth(3),
                                  ),
                                ],
                              ),
                              SizedBox(
                                width: setWidth(5),
                              ),
                              Text(
                                '3789.00',
                                style: TextStyle(
                                  color: Color(0xff010015),
                                  fontSize: setSp(26),
                                ),
                              ),
                            ],
                          ),
                        ],
                      ),
                    ),
                  ),
                  InkWell(
                    onTap: () async {
                      urlPush(context, "yuntu://top_up");
                    },
                    child: Container(
                      width: setWidth(90),
                      height: setWidth(30),
                      decoration: BoxDecoration(
                        border: Border.all(
                          width: setWidth(0.5),
                          color: Color(0xff1a79ff),
                        ),
                        borderRadius: BorderRadius.circular(setWidth(15)),
                      ),
                      alignment: Alignment.center,
                      child: Text(
                        '充值',
                        style: TextStyle(
                          color: Color(0xff1a79ff),
                          fontSize: setSp(14),
                        ),
                      ),
                    ),
                  ),
                ],
              ),
            ),
            // 可用余额
            InkWell(
              onTap: () async {
                urlPush(context, "yuntu://withdrawal");
              },
              child: Container(
                margin: EdgeInsets.only(top: setWidth(12)),
                padding: EdgeInsets.symmetric(horizontal: setWidth(15)),
                height: setWidth(60),
                color: Colors.white,
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text(
                      '可用余额',
                      style: TextStyle(
                        color: Color(0xff595959),
                        fontSize: setSp(15),
                      ),
                    ),
                    Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      crossAxisAlignment: CrossAxisAlignment.end,
                      children: [
                        Text(
                          '2585.00元',
                          style: TextStyle(
                            color: Color(0xff010015),
                            fontSize: setSp(15),
                          ),
                        ),
                        SizedBox(
                          height: setWidth(3),
                        ),
                        Text(
                          '去提现 >',
                          style: TextStyle(
                            color: Color(0xff1a79ff),
                            fontSize: setSp(15),
                          ),
                        ),
                      ],
                    ),
                  ],
                ),
              ),
            ),
            // 待结算金额
            Container(
              margin: EdgeInsets.only(top: setWidth(1)),
              padding: EdgeInsets.symmetric(horizontal: setWidth(15)),
              height: setWidth(60),
              color: Colors.white,
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  Text(
                    '待结算金额',
                    style: TextStyle(
                      color: Color(0xff595959),
                      fontSize: setSp(15),
                    ),
                  ),
                  Text(
                    '1204.00元',
                    style: TextStyle(
                      color: Color(0xff010015),
                      fontSize: setSp(15),
                    ),
                  ),
                ],
              ),
            ),
            // 账单明细
            InkWell(
              onTap: () async {
                urlPush(context, "yuntu://bill_details");
              },
              child: Container(
                margin: EdgeInsets.only(top: setWidth(12)),
                padding: EdgeInsets.symmetric(horizontal: setWidth(15)),
                height: setWidth(60),
                color: Colors.white,
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text(
                      '账单明细',
                      style: TextStyle(
                        color: Color(0xff010015),
                        fontSize: setSp(15),
                      ),
                    ),
                    Image.asset(
                      'assets/images/right_go.png',
                      width: setWidth(6),
                      height: setWidth(11),
                      fit: BoxFit.fill,
                    ),
                  ],
                ),
              ),
            ),
            // 待结算流水
            InkWell(
              onTap: () async {
                print('待结算流水  点击事件!!!!');
                urlPush(context, "yuntu://flow_too_be_settled");
              },
              child: Container(
                margin: EdgeInsets.only(top: setWidth(1)),
                padding: EdgeInsets.symmetric(horizontal: setWidth(15)),
                height: setWidth(60),
                color: Colors.white,
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text(
                      '待结算流水',
                      style: TextStyle(
                        color: Color(0xff010015),
                        fontSize: setSp(15),
                      ),
                    ),
                    Image.asset(
                      'assets/images/right_go.png',
                      width: setWidth(6),
                      height: setWidth(11),
                      fit: BoxFit.fill,
                    ),
                  ],
                ),
              ),
            ),
            // 我的银行卡
            InkWell(
              onTap: () async {
                print('立即添加 >  点击事件!!! ');
                urlPush(context, "yuntu://add_bank_card");
              },
              child: Container(
                margin: EdgeInsets.only(top: setWidth(1)),
                padding: EdgeInsets.symmetric(horizontal: setWidth(15)),
                height: setWidth(60),
                color: Colors.white,
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text(
                      '我的银行卡',
                      style: TextStyle(
                        color: Color(0xff010015),
                        fontSize: setSp(15),
                      ),
                    ),
                    Text(
                      '立即添加 >',
                      style: TextStyle(
                        color: Color(0xff1a79ff),
                        fontSize: setSp(14),
                      ),
                    ),
                  ],
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
